<?php
namespace app\api\controller\Home;
use think\Controller;
class Home extends Controller
{
    public function index()
    {
        // 分类
        $TypeList = model('Product.Type')->order('weigh','desc')->limit(8)->select();
        $NewLit = model('Product.Product')->where(['flag' => 1])->limit(4)->select();
        $data = [
            'TypeList' => $TypeList,
            'NewList' => $NewLit
        ];
        $this->success('查询成功',null,$data);
    }
    public function banner()
    {
        $list = model('Product.Product')->where(['flag' => 3])->order('id','desc')->limit(5)->select();
        $this->success('查询成功',null,$list);
    }
}